<template>
	<view>
		<swiper indicator-dots="true" class="banner">
			<swiper-item v-for="(item,index) in swiperData" :key="index" @tap="clickImg(index)">
				　　<image :src="item.imgUrl" mode="aspectFill" class="banner"></image>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				swiperData: [{
					imgUrl: 'https://video.file.zhuochengyun.com/bwc/uploads/20240131/20240131170118177764.png'
				}, {
					imgUrl: 'https://video.file.zhuochengyun.com/bwc/uploads/20240131/20240131170134342210.png'
				}, {
					imgUrl: 'https://video.file.zhuochengyun.com/bwc/uploads/20240131/20240131170146856128.png'
				}, {
					imgUrl: 'https://video.file.zhuochengyun.com/bwc/uploads/20240131/20240131170157953917.png'
				}, {
					imgUrl: 'https://video.file.zhuochengyun.com/bwc/uploads/20240131/20240131170209579584.png'
				}],
			}
		},
		methods: {
			clickImg(index) {

				if (index == 4) {
					uni.switchTab({
						url: '/pages/index/newIndex'
					})
				}
			}
		},
	}
</script>

<style>
	.banner {
		position: fixed;
		width: 100%;

		height: 100%;
		top: 0;
		left: 0;
	}
</style>
